home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d26 / studyaid.arc / Q&A.DOC < prev    next >
Text File  |  1990-05-17  |  20KB  |  560 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.                                  Q & A Study Aid
  26.  
  27.                                   Version 1.00
  28.  
  29.                                  January 7, 1988
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.                                   Hal Endresen
  53.                               Quid Pro Quo Software
  54.                              150 Wellington Terrace
  55.                                Lansdale, PA 19446
  56.  
  57.  
  58.  
  59.  
  60.  
  61.                                    1
  62.  
  63.  
  64.  
  65.  
  66.  
  67.         General
  68.         -------
  69.  
  70.         Q & A is a general-purpose program designed to present  questions
  71.         from  a  database. The user is then prompted for  an  answer  and
  72.         graded accordingly.
  73.  
  74.         Q&A  provides  two  methods of reading  the  questions  from  the
  75.         database: sequential and random. The program starts up in  random
  76.         mode.
  77.  
  78.         A menu-driven command interface is provided with pull-down menus.
  79.         Filenames are selected from a directory by pointing. It is  never
  80.         necessary to type in a filename.
  81.  
  82.         Q&A sports a context-sensitive help system accessible via the  F1
  83.         key. Help is provided by two support files, Q&A.HLP and  Q&A.NDX.
  84.         These  files  may be located in the current directory or  in  any
  85.         directory  specified  in the PATH environment variable.  Q&A  may
  86.         therefore  be  placed in the \bin (or equivalent)  directory  and
  87.         accessed  from any other directory, provided that  PATH  includes
  88.         \bin.
  89.  
  90.         This package contains the following files:
  91.  
  92.              Q&A.EXE        main program file
  93.              Q&A.HLP        help file
  94.              Q&A.NDX        help index file
  95.              Q&A.DOC        documentation file
  96.  
  97.              SAMPLE.Q&A     sample database
  98.  
  99.         Q&A  is  public  domain, and may be  freely  distributed.  Please
  100.         distribute  the entire archive, STUDYAID.ARC, and please  do  not
  101.         hack the program. The only file that may be safely modified, with
  102.         restrictions,  is  the sample database. The  author  requests  no
  103.         contributions.  I have received so much value from public  domain
  104.         software  that this is one small way to attempt to repay a  large
  105.         debt.
  106.  
  107.         Q&A is offered as is. There is no guarantee that it will work  on
  108.         your particular system; however, it has been tested with CGA, MDA
  109.         and EGA monitors. Text mode is used; no graphics card is needed.
  110.  
  111.  
  112.         Command Interface
  113.         -----------------
  114.  
  115.         Commands  are  entered into Q&A via a  pull-dowm  two-level  menu
  116.         system. The uppermost screen reqion is the menu system. Each word
  117.         group  on the menu line is the title block of a  pull-down  menu.
  118.         Whenever  one  of  the titles is selected, the  menu  expands  to
  119.         display the options available under it.
  120.  
  121.  
  122.  
  123.                                    2
  124.  
  125.  
  126.  
  127.  
  128.         Under  most conditions, Q&A will be prompting for an answer to  a
  129.         question. Some means must therefore be provided to break out  and
  130.         into the menu system so that an option can be selected. There are
  131.         two  ways of doing this: via an ALT key sequence or  by  pressing
  132.         the menu escape character, the forward slash ('/').
  133.  
  134.         If an ALT sequence is used, it is only necessary to press two ALT
  135.         keys  to select any command option. The first character  of  each
  136.         menu  level is selected by ALT-shifting the letter. For  example,
  137.         the "Mode / Sequential" command is executed with ALT-M/ALT-S.
  138.  
  139.         Using  the  '/' menu escape character, the word MENU  will  first
  140.         appear at the right of the menu line to indicate that you are  in
  141.         the menu system. At this point, any combination of first  letters
  142.         and cursor keys can be used to select a command option. Note that
  143.         F1  will always get help no matter where you may be in  the  menu
  144.         system.  Once  the  desired  option  has  been  selected,  RETURN
  145.         executes it. Note that RETURN is not necessary when using ALT-key
  146.         sequences.
  147.  
  148.         Q&A's commands are listed below.
  149.  
  150.              /FS       select database
  151.              /FD       specify directory containing database file(s)
  152.              /FE       exit to DOS
  153.              /MS       set mode to sequential
  154.              /MP       set mode to pseudorandom
  155.              /MC       clear score
  156.  
  157.  
  158.         Specify Database Directory
  159.         --------------------------
  160.  
  161.         If your Q&A database files are located in a directory other  than
  162.         the directory Q&A was invoked from, then you must tell Q&A  which
  163.         directory  to use with this command. When selected, a data  entry
  164.         window  will  pop up and prompt for the directory  name.  DO  NOT
  165.         enter a filename. The directory will be verified as such, and you
  166.         will  receive  an  error if the directory  does  not  exist.  The
  167.         directory  you  specify  need  not be on  the  same  disk  drive.
  168.         However,  if you give the name of a directory on a  floppy  disk,
  169.         you must have the floppy in the drive with the door closed or you
  170.         will get an error.
  171.  
  172.         Select Database File
  173.         --------------------
  174.  
  175.         This option is used to specify the name of the database file  you
  176.         want  Q&A  to use. Once selected, a directory of  the  disk  will
  177.         appear  in  a  window  along  with  a  selection  bar.  To  avoid
  178.         restrictions  on  the names of the database files, Q&A  does  not
  179.         filter  these  files; all files are shown except for  parent  and
  180.         child directories and hidden files.
  181.  
  182.         To  select the database file, move the selection bar to it  using
  183.  
  184.  
  185.                                    3
  186.  
  187.  
  188.  
  189.  
  190.         the cursor keys, page up and down, or home and end. Each of these
  191.         permits  traveling  up  and down the scrollable  list  in  larger
  192.         increments.  Alternatively, you may also press a letter key  that
  193.         corresponds to the first character of the database filename;  Q&A
  194.         will  find the first file beginning with that letter.  Successive
  195.         depressions  of  the  same key will step to  each  filename  that
  196.         begins  with that letter. The search stops at the last file  that
  197.         begins  with  that letter. The search always  proceeds  down  the
  198.         list;  to restart the search, press HOME to move the selector  to
  199.         the first file in the directory.
  200.  
  201.         Once  you have pointed to the file you desire, press RETURN.  The
  202.         file  will  be loaded and the first question will appear  on  the
  203.         screen, along with the number of questions in the database in the
  204.         scoring  window. The name of the file will also be shown  in  the
  205.         scoring window under the "Database" heading.
  206.  
  207.         To  permit  Q&A  to utilize relatively  large  databases  (>=3000
  208.         questions),  Q&A  loads  an index into  memory  rather  than  the
  209.         database  file  itself.  The database index is  a  file  that  is
  210.         created  by Q&A from the database the first time the database  is
  211.         used. Once created, Q&A will use the new index the next time that
  212.         database is used rather than creating a new one. This index  file
  213.         will  always  have the same base name as the database  file,  but
  214.         with an extension of ".X".
  215.  
  216.         The index will remain serviceable as long as the database is  not
  217.         changed. If you do change the database, DELETE THE INDEX so  that
  218.         Q&A  will create a new one. A future enhancement will  check  the
  219.         modification  time  of the database and create a new  index  when
  220.         needed.  Note  that this arrangement permits Q&A  to  arbitrarily
  221.         write over an old index - so make sure you do not have any  files
  222.         with the same name as the index or they will be overwritten!
  223.  
  224.         You  must  create  the  database file before  Q&A  can  be  used.
  225.         Instructions  for  doing  this are in a  later  section  of  this
  226.         document.
  227.  
  228.  
  229.         Exit to DOS
  230.         -----------
  231.  
  232.         Use  this  command  to  quit a Q&A  session  and  return  to  the
  233.         operating system command level.
  234.  
  235.  
  236.         Sequential Mode
  237.         ---------------
  238.  
  239.         The sequential mode option tells Q&A that you wish to answer  the
  240.         questions in the same order as they appear in the database  file.
  241.         When  selected, the new mode will appear in the  scoring  window.
  242.         This  option  does  NOT  cause Q&A  to  start  reading  from  the
  243.         beginning  of  the  file; it simply changes the  method  used  to
  244.         determine  the  next question. This is done  to  allow  switching
  245.  
  246.  
  247.                                    4
  248.  
  249.  
  250.  
  251.  
  252.         between  modes.  If you go out of sequential mode,  you  will  be
  253.         brought back to the same place in the database when you return to
  254.         it.  When  the end of the database is reached,  Q&A  will  simply
  255.         restart at the beginning and continue asking questions.
  256.  
  257.  
  258.         Pseudorandom Mode
  259.         -----------------
  260.  
  261.         This  mode is used when you want Q&A to choose the  questions  at
  262.         random. The random number generator is seeded on each  invocation
  263.         of  Q&A  by using the BIOS time-of-day clock to insure  that  the
  264.         pseudorandom sequence is different each time the program is run.
  265.  
  266.         In  this  mode,  'end-of-file' has no meaning,  since  Q&A  jumps
  267.         randomly around the database and presents the questions.
  268.  
  269.  
  270.         Clear
  271.         -----
  272.  
  273.         Use  the  Clear option to reset your score back to  zero  and  to
  274.         reset  the  sequential mode index back to the  beginning  of  the
  275.         file. The sequential mode index is cleared only here and when the
  276.         database is initially loaded.
  277.  
  278.  
  279.         Scoring Window
  280.         --------------
  281.  
  282.         The scoring window always shows the current state of both you and
  283.         Q&A.  The items that appear in the scoring window  are  described
  284.         below.
  285.  
  286.              Database       This  is  the  name  of  the  database   file
  287.                             currently  in  use by Q&A. Once  loaded,  you
  288.                             cannot  remove it unless you replace it  with
  289.                             another one. When Q&A starts, no database  is
  290.                             loaded, and "[ none ]" is displayed.
  291.  
  292.              Mode           This  is the current question-indexing  mode,
  293.                             and  will  be "Random" or  "Sequential".  Q&A
  294.                             always starts up in random mode.
  295.  
  296.              # Questions    When   a  database  has  been  loaded,   this
  297.                             represents  the total number of questions  in
  298.                             the database.
  299.  
  300.              # Asked        Tells  the number of questions that  Q&A  has
  301.                             asked. Since you cannot skip over  questions,
  302.                             it is also the number that you have answered.
  303.                             Note  that  this  may exceed  the  number  of
  304.                             questions in the database.
  305.  
  306.  
  307.  
  308.  
  309.                                    5
  310.  
  311.  
  312.  
  313.  
  314.  
  315.              # Correct      This  is  the number of  questions  that  you
  316.                             answered correctly.
  317.  
  318.              Score          Your score is a simple ratio of the number of
  319.                             questions  asked to the number  you  answered
  320.                             correctly, and is displayed in percent.
  321.  
  322.  
  323.         Creating a Database
  324.         -------------------
  325.  
  326.         The  database is the heart of Q&A. Q&A receives virtually all  of
  327.         the  information it needs to present and score your answers  from
  328.         the database.
  329.  
  330.         The  database  is  a plain ASCII, or 'flat',  file  that  can  be
  331.         created  using almost any editor. If you use a word processor  to
  332.         create  the database file, be sure to use its 'nondocument'  mode
  333.         to insure that it won't put in a rash of formatting codes.
  334.  
  335.         To enable Q&A to handle all of the common question formats except
  336.         'essay'  questions, a very general database arrangement is  used.
  337.         Q&A  expects each question to be followed by the correct  answer,
  338.         which it uses to check your answer.
  339.  
  340.         Q&A can handle multiple-choice, true/false, and fill-in-the-blank
  341.         questions with equal ease.
  342.  
  343.         The  database must contain one instance of each of  two  keywords
  344.         for  each question in the database. These keywords are,  exactly,
  345.         in quotes:
  346.  
  347.              "Q="
  348.              "A="
  349.  
  350.         As you might expect, these stand for "question" and "answer". The
  351.         question  MUST  precede the answer. Q&A will complain  about  any
  352.         irregularities  it finds in the database when it  constructs  the
  353.         index file.
  354.  
  355.         The  first example is a multiple-choice question.  The  following
  356.         text is entered into the database:
  357.  
  358.         Q=
  359.         Multiple-choice:
  360.  
  361.         What is the capital of Pennsylvania?
  362.         A. Philadelphia
  363.         B. Washington, D.C.
  364.         C. Harrisburg
  365.         D. None of the above
  366.  
  367.         A=
  368.         C
  369.  
  370.  
  371.                                    6
  372.  
  373.  
  374.  
  375.  
  376.  
  377.         What  Q&A will do with this is to display the question  beginning
  378.         on  the line immediately following the 'Q=' line. The end of  the
  379.         question  is marked by the 'A='. All lines between these  markers
  380.         form  the question, which Q&A will display exactly as it  appears
  381.         in  the database. You may, therefore, format your  questions  any
  382.         way that you wish. Q&A will impose NO restrictions other than the
  383.         number  of lines; you may use up to 15 lines. If the question  is
  384.         longer than that, the extra lines will be discarded. Blank  lines
  385.         following  the actual question and the 'A=' line are  effectively
  386.         discarded.
  387.  
  388.         Note that the 'Multiple-choice' prompt is actually a part of  the
  389.         database - NOT hard-coded into Q&A.
  390.  
  391.         The  answer follows beginning on the line immediately  after  the
  392.         'A='. In this example, it is 'C'. All this means is that Q&A will
  393.         score as correct any response to the question that is exactly 'C'
  394.         OR  'c'  - case is insignificant. Q&A does some  reformatting  of
  395.         these  strings, however. Both the answer in the database and  the
  396.         answer typed in by you are processed the same way:
  397.  
  398.              1. All leading whitespace is removed. This means that
  399.                   C
  400.                 and
  401.                                  C
  402.                 are identical and are themselves identical to the 'C'  in
  403.                 the example above.
  404.  
  405.              2. All trailing whitespace, including newline characters, is
  406.                 removed.
  407.  
  408.              3. All  whitespace  between words is collapsed to  a  single
  409.                 space;  "hello  there" and "hello             there"  are
  410.                 identical.
  411.  
  412.              4. All  characters are folded to uppercase; 'Yes' and  'yes'
  413.                 are therefore identical.
  414.  
  415.         These  steps  insure  that  a response  will  not  be  scored  as
  416.         incorrect  due  to the position of the response  in  either  your
  417.         answer or that in the database.
  418.  
  419.         Note that these same rules are also applied to the 'Q=' and  'A='
  420.         markers.  They may, therefore, appear anywhere on the  line.  You
  421.         cannot, however, insert anything between 'Q' and '='; nor can you
  422.         put anything else on the line with the marker.
  423.  
  424.         In the example above, one correct answer was specified. The  only
  425.         answer that will be scored as correct is 'C'. Note that we  could
  426.         just as well have used numbers as selectors and given '3' as  the
  427.         answer.  Q&A makes no attempt to interpret this  information;  it
  428.         simply  looks for an exact match based on the  criteria  outlined
  429.         above.
  430.  
  431.  
  432.  
  433.                                    7
  434.  
  435.  
  436.  
  437.  
  438.  
  439.         This next example will demonstrate a true/false question.
  440.  
  441.         Q=
  442.  
  443.  
  444.  
  445.                 Answer true or false:
  446.  
  447.                 Q&A understands the information in the database.
  448.                       A=
  449.         False
  450.  
  451.         Note the (legal) position of the 'A='. This time we have indented
  452.         the  question  using  tabs. When Q&A displays  the  question,  it
  453.         expand the tabs automatically to maintain the alignment as it  is
  454.         in  the database. We also have three blank lines after the  'Q=';
  455.         this  serves to shift the question down toward the center of  the
  456.         question window to make it look nicer.
  457.  
  458.         This  example is not good practice, since the 'A=' would be  easy
  459.         to  miss  if  the database were edited, and  the  indentation  is
  460.         inconsistent. It does, however, have a more serious drawback:  to
  461.         get  the  question  right,  you  must  type  in  'false',  all  5
  462.         characters - and 'false' is one word I just cannot type.
  463.  
  464.         For  a true/false question, one would be likely to  respond  with
  465.         'T',  'F',  'yes', 'y', or possibly '1' and  '0'.  To  accomodate
  466.         these options, Q&A allows more than one correct answer. In  fact,
  467.         every  nonblank line between 'A=' and the next 'Q=' is a  correct
  468.         answer.   The   second  example  above,  then,  would   be   more
  469.         appropriately given by
  470.  
  471.  
  472.         Q=
  473.  
  474.  
  475.  
  476.           Answer true or false:
  477.  
  478.           Q&A understands the information in the database.
  479.  
  480.         A=
  481.  
  482.         False
  483.         F
  484.         No
  485.         N
  486.  
  487.         This  permits any of the four answers to be regarded as  correct.
  488.  
  489.         If  you give an incorrect response to a question or one  that  is
  490.         not  among  the  list of correct answers, Q&A  will  display  the
  491.         correct  answer  for you (as well as subtract a point  from  your
  492.         score).  When Q&A displays the correct answer, it uses the  first
  493.  
  494.  
  495.                                    8
  496.  
  497.  
  498.  
  499.  
  500.         one given in the answer list (blank lines are ignored). What this
  501.         means is that Q&A will display
  502.  
  503.              Incorrect. The correct answer is
  504.                          False
  505.  
  506.         which is more formal than 'N', for example.
  507.  
  508.         This  feature  adds  a lot of versatility to Q&A.  Since  Q&A  is
  509.         intended  to be a study aid, it should provide  reinforcement  of
  510.         correct answers by permitting a more complete correct answer.  To
  511.         demonstrate  this, we'll use a third example; this time, a  fill-
  512.         in-the-blank question:
  513.  
  514.         Q=
  515.              The speed of light is ______ km/sec.
  516.  
  517.         A=
  518.              Light travels at 300,000 km/sec.
  519.              300000
  520.              300,000
  521.              300K
  522.  
  523.         In this example, an incorrect response will elicit
  524.  
  525.              Incorrect. The correct answer is
  526.              Light travels at 300,000 km/sec.
  527.  
  528.         Of  course,  this is also a correct answer in itself, but  not  a
  529.         likely one. If you do enter it, it will be scored as correct. You
  530.         would be required to use the period, also.
  531.  
  532.         There  are  three more plausible correct answers that  Q&A  would
  533.         consider  to be correct. Any one of them is sufficient to  credit
  534.         the answer to you.
  535.  
  536.  
  537.         Conclusion
  538.         ----------
  539.  
  540.         Each  of  these examples is reproduced in  the  sample  database,
  541.         SAMPLE.Q&A.  Experiment with it (remember to delete the index  if
  542.         you  change  it), but don't pass on a modified  copy  to  someone
  543.         else.
  544.  
  545.                                       The author
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.                                    9
  558.  
  559. F
  560.